# encoding: utf-8

class PlanUploader < CarrierWave::Uploader::Base

  include CarrierWave::MiniMagick
  storage :file

  def store_dir
    "uploads/plan/#{model.id}"
  end

  def filename
  	@name ||= Digest::MD5.hexdigest(current_path)
  	"#{@name}.#{file.extension}"
  end

  def extension_white_list
    %w(rar zip)
  end

end
